<!DOCTYPE html>
<html>
<head>
	<title id="title">index</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link href="bootstrap.min.css" rel="stylesheet">
	<script src="jquery-1.11.1.min.js"></script>
	<script src="bootstrap.min.js"></script>
	<link href="bootstrapValidator.min.css" rel="stylesheet">
	<script src="bootstrapValidator.min.js"></script>
	<script src="index.js"></script>
	<style>
		.table th, .table td {
			text-align: center;
		}
		.table-hover > tbody > tr:hover > td > a{
			cursor: pointer;
		}
		.navbar-nav li:hover,
		.nav-sidebar li:hover,
		.breadcrumb li:hover{
			cursor: pointer;
		}
		body {
			padding-top: 50px;
		}
		.sub-header {
			padding-bottom: 10px;
			border-bottom: 1px solid #eee;
		}
		.navbar-fixed-top {
			border: 0;
		}
		.sidebar {
			display: none;
		}
		@media (min-width: 768px) {
			.sidebar {
				position: fixed;
				top: 51px;
				bottom: 0;
				left: 0;
				z-index: 1000;
				display: block;
				padding: 20px;
				overflow-x: hidden;
				overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
				background-color: #f5f5f5;
				border-right: 1px solid #eee;
			}
		}
		.nav-sidebar {
			margin-right: -21px; /* 20px padding + 1px border */
			margin-bottom: 20px;
			margin-left: -20px;
		}
		.nav-sidebar > li > a {
			padding-right: 20px;
			padding-left: 20px;
		}
		.nav-sidebar > .active > a,
		.nav-sidebar > .active > a:hover,
		.nav-sidebar > .active > a:focus {
			color: #fff;
			background-color: #428bca;
		}
		.main {
			padding: 20px;
		}
		@media (min-width: 768px) {
			.main {
				padding-right: 40px;
				padding-left: 40px;
			}
		}
		.main .page-header {
			margin-top: 0;
		}
		.placeholders {
			margin-bottom: 30px;
			text-align: center;
		}
		.placeholders h4 {
			margin-bottom: 0;
		}
		.placeholder {
			margin-bottom: 20px;
		}
		.placeholder img {
			display: inline-block;
			border-radius: 50%;
		}

	</style>
</head>
<body>
	<div class="navbar navbar-fixed-top navbar-inverse">
		<div class="container-fluid">
			<p id="devName" class="navbar-brand"><strong>智能插座</strong></p>
			<div class="navbar-header">
				<button type="button" class="navbar-toggle " data-toggle="collapse" data-target="#navBar" aria-expanded="false" aria-controls="navbar">
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
			</div>
			<div class="collapse navbar-collapse navbar-right" id="navBar">
				<ul class="nav navbar-nav navbar-right">
					<li><a id="relay">关闭</a></li>
					<li><a id="date" >2019-01-01 00:00:00 星期一</a></li>
					<li><a id="temperature" >0 ℃</a></li>
					<li><a id="information" data-toggle="modal" data-target="#aboutModal">关于</a></li>
					<li><a id="console" >控制台</a></li>
				</ul>
			</div>
		</div>
	</div>
	<div id="content">

	<div class="container-fluid">
		<div class="row">
			<div class="main">
				<ul class="breadcrumb">
					<li><a id="timer">定时</a></li>
					<li><a id="delay">延时</a></li>
					<li><a id="infrared">红外</a></li>
					<li><a id="meter">电量</a></li>
					<li><a id="cloudPlatform">云平台</a></li>
					<li><a id="set">设置</a></li>
				</ul>

				<div class="table-responsive">
					<table id="tabTimer" class="table tah3e-striped table-hover"></table>
				</div>

				<div class="table-responsive">
					<table id="tabDelay" class="table table-striped table-hover"></table>
				</div>

				<div class="table-responsive">
					<table id="tabInfrared" class="table table-striped table-hover"></table>
				</div>

				<form id="formCloudPlatform" class="form-horizontal hidden" action="#" method="POST">
					<div class="form-group">
						<label class="col-sm-1 control-label">提示 :</label>
						<span class="help-block col-sm-10">对接云平台可实现设备的远程控制，目前支持贝壳物联、阿里云。注意:只有在连接到外网时才会对接成功</span>
					</div>
					<div id="PlatformSelectClass" class="form-group">
						<label class="col-sm-1 control-label">* 平台 :</label>
						<div class="col-sm-3 ">
							<select id="PlatformSelect" class="form-control">
								<option value=0 selected>不对接任何平台</option>
								<option value=1>阿里云</option>
								<option value=2>贝壳物联</option>
							</select>
						</div>
						<span class="help-block col-sm-6"><p id="connectSta" class="text-info"></p></span>
					</div>
					<div id="ProductKeyClass" class="form-group hidden">
						<label class="col-sm-1 control-label">* 产品 :</label>
						<div class="col-sm-3 ">
							<input id="ProductKey" class="form-control" type="text" placeholder="Product Key">
						</div>
						<span class="help-block col-sm-5">阿里云ProductKey</span>
					</div>
					<div id="DeviceNameClass" class="form-group hidden">
						<label class="col-sm-1 control-label">* 设备 :</label>
						<div class="col-sm-3 ">
							<input id="DeviceName" class="form-control" type="text" placeholder="Device Name">
						</div>
						<span class="help-block col-sm-5">阿里云DeviceName</span>
					</div>
					<div id="DeviceSecretClass" class="form-group hidden">
						<label class="col-sm-1 control-label">* 密钥 :</label>
						<div class="col-sm-3 ">
							<input id="DeviceSecret" class="form-control" type="password" placeholder="Device Secret">
						</div>
						<span class="help-block col-sm-5">阿里云DeviceSecret</span>
					</div>
					<div id="BigiotDeviceNameClass" class="form-group hidden">
						<label class="col-sm-1 control-label">设备名称 :</label>
						<div class="col-sm-3 ">
							<input id="BigiotDeviceName" class="form-control" readonly="readonly" type="text" placeholder="Device Name">
						</div>
						<span class="help-block col-sm-5">贝壳物联设备名称</span>
					</div>
					<div id="BigiotDeviceTypeClass" class="form-group hidden">
						<label class="col-sm-1 control-label">设备类型 :</label>
						<div class="col-sm-3 ">
							<select id="BigiotDeviceTypeSelect" class="form-control">
								<option value=0>默认设备</option >
								<option value=1>电视</option >
								<option value=2>灯</option >
								<option value=3>空调</option >
								<option value=4>空气净化器</option >
								<option value=5>插座</option >
								<option value=6>开关</option >
								<option value=7>扫地机器人</option >
								<option value=8>窗帘</option >
								<option value=9>加湿器</option >
								<option value=10>风扇</option >
								<option value=11>暖奶器</option >
								<option value=12>豆浆机</option >
								<option value=13>电热水壶</option >
								<option value=14>饮水机</option >
								<option value=15>摄像头</option >
								<option value=16>路由器</option >
								<option value=17>电饭煲</option >
								<option value=18>热水器</option >
								<option value=19>烤箱</option >
								<option value=20>净水器</option >
								<option value=21>冰箱</option >
								<option value=22>机顶盒</option >
								<option value=23>传感器</option >
								<option value=24>洗衣机</option >
								<option value=25>智能床</option >
								<option value=26>香薰机</option >
								<option value=27>窗</option >
								<option value=28>抽油烟机</option >
								<option value=29>指纹锁</option >
								<option value=30>万能遥控器</option >
								<option value=31>洗碗机</option >
								<option value=32>除湿机</option >
								<option value=33>干衣机</option >
								<option value=34>壁挂炉</option >
								<option value=35>微波炉</option >
								<option value=36>取暖器</option >
								<option value=37>驱蚊器</option >
								<option value=38>跑步机</option >
								<option value=39>智能门控(门锁)</option >
								<option value=40>智能手环</option >
								<option value=41>晾衣架</option >
							</select>
						</div>
						<span class="help-block col-sm-6">选择贝壳物联的设备类型</span>
					</div>
					<div id="BigiotDeviceIdClass" class="form-group hidden">
						<label class="col-sm-1 control-label">* 设备ID :</label>
						<div class="col-sm-3 ">
							<input id="BigiotDeviceId" class="form-control" type="text" placeholder="Device Id">
						</div>
						<span class="help-block col-sm-5">贝壳物联设备ID</span>
					</div>
					<div id="BigiotApiKeyClass" class="form-group hidden">
						<label class="col-sm-1 control-label">* API KEY :</label>
						<div class="col-sm-3 ">
							<input id="BigiotApiKey" class="form-control" type="password" placeholder="API Key">
						</div>
						<span class="help-block col-sm-5">贝壳物联API Key</span>
					</div>
					<div id="BigiotIfSwitchStatusClass" class="form-group hidden">
						<label class="col-sm-1 control-label">开关接口 :</label>
						<div class="col-sm-3 ">
							<input id="BigiotIfSwitchStatus" class="form-control" type="text" placeholder="开关接口ID">
						</div>
						<span class="help-block col-sm-5">开关接口ID, 用于上报设备的开关状态</span>
					</div>
					<div id="BigiotIfTempClass" class="form-group hidden">
						<label class="col-sm-1 control-label">温度接口 :</label>
						<div class="col-sm-3 ">
							<input id="BigiotIfTemp" class="form-control" type="text" placeholder="温度接口ID">
						</div>
						<span class="help-block col-sm-5">温度接口ID， 用于上报设备的温度</span>
					</div>
					<div id="BigiotIfHumidityClass" class="form-group hidden">
						<label class="col-sm-1 control-label">湿度接口 :</label>
						<div class="col-sm-3 ">
							<input id="BigiotIfHumidity" class="form-control" type="text" placeholder="湿度接口ID">
						</div>
						<span class="help-block col-sm-5">湿度接口ID， 用于上报设备的湿度</span>
					</div>
					<div id="BigiotIfVoltageClass" class="form-group hidden">
						<label class="col-sm-1 control-label">电压接口 :</label>
						<div class="col-sm-3 ">
							<input id="BigiotIfVoltage" class="form-control" type="text" placeholder="电压接口ID">
						</div>
						<span class="help-block col-sm-5">电压接口ID， 用于上报设备的电压</span>
					</div>
                    <div id="BigiotIfCurrentClass" class="form-group hidden">
                        <label class="col-sm-1 control-label">电流接口 :</label>
                        <div class="col-sm-3 ">
                            <input id="BigiotIfCurrent" class="form-control" type="text" placeholder="电流接口ID">
                        </div>
                        <span class="help-block col-sm-5">电流接口ID， 用于上报设备的电流</span>
                    </div>
                    <div id="BigiotIfPowerClass" class="form-group hidden">
                        <label class="col-sm-1 control-label">功率接口 :</label>
                        <div class="col-sm-3 ">
                            <input id="BigiotIfPower" class="form-control" type="text" placeholder="功率接口ID">
                        </div>
                        <span class="help-block col-sm-5">功率接口ID， 用于上报设备的功率</span>
                    </div>
                    <div id="BigiotIfElectricityClass" class="form-group hidden">
                        <label class="col-sm-1 control-label">电量接口 :</label>
                        <div class="col-sm-3 ">
                            <input id="BigiotIfElectricity" class="form-control" type="text" placeholder="电量接口ID">
                        </div>
                        <span class="help-block col-sm-5">电量接口ID， 用于上报设备的电量</span>
                    </div>
					<div class="form-group">
						<label class="col-sm-1 control-label"></label>
						<div class="col-sm-3">
							<button id="cloudPlatformCommit" class="btn btn-primary btn-block" type="button">确定</button>
						</div>
						<span class="help-block col-sm-5">修改后重启生效</span>
					</div>
				</form>
				<form id="formSet" class="form-horizontal hidden" action="#" method="POST">
					<div class="form-group">
						<label class="col-sm-1 control-label">提示 :</label>
						<span class="help-block col-sm-10">短按按键可直接控制开关，按下按键3-6s当wifi指示灯快速闪烁进入热点模式；按键按下6s以上wifi指示灯常亮进入客户端模式</span>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">名称 :</label>
						<div class="col-sm-3 ">
							<input id="plugName" class="form-control" type="text" placeholder="请输入名称...">
						</div>
						<span class="help-block col-sm-5">32个字符以内（每个中文占3个字符）</span>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">模式 :</label>
						<div class="col-sm-3 ">
							<select id="modeSelect" class="form-control">
								<option value=0 disabled selected hidden>请选择模式...</option>
								<option value=1>客户端</option>
								<option value=2>热点</option>
								<option value=3>智能配对</option>
							</select>
						</div>
						<span class="help-block col-sm-6">热点模式：设备将发射WIFI信号；客户端模式：设备需要连接路由器</span>
					</div>

                    <div id="wifiClass" class="row form-group">
                        <label class="col-sm-1 control-label">WIFI :</label>
                        <div class="col-sm-3">
                            <div class="input-group">
                                <select id="wifiList" class="form-control"></select>
                                <span class="input-group-btn">
                                    <button id="scanWifi" class="btn btn-primary btn-block" type="button">扫描</button>
                                </span>
                            </div>
                        </div>
                    </div>
					<div id="wifiCustomClass" class="form-group hidden">
						<label class="col-sm-1 control-label">WIFI :</label>
						<div class="col-sm-3 ">
							<input id="wifiCustom" class="form-control" type="text" placeholder="WIFI名称">
						</div>
						<span class="help-block col-sm-5">请输入要连接的WIFI</span>
					</div>
					<div id="wifiPasswdClass" class="form-group hidden">
						<label class="col-sm-1 control-label">密码 :</label>
						<div class="col-sm-3 ">
							<input id="wifiPasswd" class="form-control" type="password" placeholder="请输入密码">
						</div>
						<span class="help-block col-sm-5">请输入要连接的WIFI密码</span>
					</div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label">上电状态 :</label>
                        <div class="col-sm-3 ">
                            <select id="relayPowerUp" class="form-control">
                                <option value=0>上次状态</option>
                                <option value=1>关闭</option>
                                <option value=2>打开</option>
                            </select>
                        </div>
                        <span class="help-block col-sm-6">关闭：上电时关闭；打开：上电时打开；上次状态：记忆上次的状态</span>
                    </div>
					<div class="form-group">
						<label class="col-sm-1 control-label"></label>
						<div class="col-sm-3">
							<button id="setCommit" class="btn btn-primary btn-block" type="button">确定</button>
						</div>
						<span class="help-block col-sm-5">修改后重启生效</span>
					</div>
					<br/>
                    <div class="row form-group">
                        <label class="col-sm-1 control-label">升级 :</label>
                        <div class="col-sm-3">
                            <div class="input-group">
                                <input id="file" type="file" accept=".bin" style="display:none">
                                <input id="binFile" class="form-control" type="text" placeholder="请选择固件">
                                <span class="input-group-btn">
                                    <button id="upload" class="btn btn-primary btn-block" type="button">升级</button>
                                </span>
                            </div>
                        </div>
                    </div>
					<div class="form-group">
						<label class="col-sm-1 control-label">重启 :</label>
						<div class="col-sm-3">
							<button id="reboot" class="btn btn-primary btn-block" type="button">重启</button>
						</div>
						<span class="help-block col-sm-5">重启设备</span>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">重置 :</label>
						<div class="col-sm-3">
							<button id="reset" class="btn btn-warning btn-block" type="button">恢复出厂设置</button>
						</div>
						<span class="help-block col-sm-5">数据将全部清零，恢复到出厂模式</span>
					</div>
			</form>

			    <form id="meterInfo" class="form-horizontal hidden" action="#" method="POST">
				<div class="form-group">
					<label class="col-sm-1 control-label">自动刷新 :</label>
					<div class="col-sm-2 ">
						<select id="meterRefreshSelect" class="form-control">
							<option value=0 selected>关闭</option>
							<option value=1>1 秒</option>
							<option value=1>2 秒</option>
							<option value=5>5 秒</option>
							<option value=5>10 秒</option>
							<option value=30>30 秒</option>
							<option value=60>60 秒</option>
							<option value=60>300 秒</option>
						</select>
					</div>
					<span class="help-block col-sm-6">设置自动刷新时间间隔</span>
				</div>
				<div class="form-group">
					<label class="col-sm-1 control-label">电压 :</label>
					<div class="col-sm-2 ">
						<input id="meterVoltage" class="form-control" type="text">
					</div>
					<span class="help-block col-sm-5">单位：V</span>
				</div>
				<div class="form-group">
					<label class="col-sm-1 control-label">电流 :</label>
					<div class="col-sm-2 ">
						<input id="meterCurrent" class="form-control" type="text">
					</div>
					<span class="help-block col-sm-5">单位：A</span>
				</div>
				<div class="form-group">
					<label class="col-sm-1 control-label">功率 :</label>
					<div class="col-sm-2 ">
						<input id="meterPower" class="form-control" type="text">
					</div>
					<span class="help-block col-sm-5">单位：W</span>
				</div>
				<div class="form-group">
					<label class="col-sm-1 control-label">视在功率 :</label>
					<div class="col-sm-2 ">
						<input id="meterApparentPower" class="form-control" type="text">
					</div>
					<span class="help-block col-sm-5">单位：W</span>
				</div>
				<div class="form-group">
					<label class="col-sm-1 control-label">功率因数 :</label>
					<div class="col-sm-2 ">
						<input id="meterPowerFactor" class="form-control" type="text">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-1 control-label">电量 :</label>
					<div class="col-sm-2 ">
						<input id="meterElectricity" class="form-control" type="text">
					</div>
					<span class="help-block col-sm-5">单位：W·h</span>
				</div>
				<div class="form-group">
					<label class="col-sm-1 control-label">运行时间 :</label>
					<div class="col-sm-2 ">
						<input id="meterRunTime" class="form-control" type="text">
					</div>
					<span class="help-block col-sm-5">单位：小时</span>
				</div>
				<div class="form-group">
					<label class="col-sm-1 control-label"></label>
					<div class="col-sm-2">
						<button id="meterClear" class="btn btn-primary btn-block" type="button">清零数据</button>
					</div>
				</div>
				<div class="row form-group">
					<label class="col-sm-1 control-label">欠压保护：</label>
					<div class="col-sm-2">
						<div class="input-group">
							<input id="underVoltage" type="text" class="form-control" aria-label="欠压保护">
							<span class="input-group-addon">
        						<input id="underVoltageEnable" type="checkbox" aria-label="欠压保护">
      						</span>
                        </div>
                    </div>
                    <span class="help-block col-sm-5">单位：V，检测到电压低于设定电压时将关闭设备</span>
                </div>
				<div class="row form-group">
					<label class="col-sm-1 control-label">过压保护：</label>
					<div class="col-sm-2">
						<div class="input-group">
							<input id="overVoltage" type="text" class="form-control" aria-label="过压保护">
							<span class="input-group-addon">
        						<input id="overVoltageEnable" type="checkbox" aria-label="过压保护">
      						</span>
                        </div>
					</div>
                    <span class="help-block col-sm-5">单位：V，检测到电压高于设定电压时将关闭设备</span>
                </div>
				<div class="row form-group">
					<label class="col-sm-1 control-label">过流保护：</label>
					<div class="col-sm-2">
						<div class="input-group">
							<input id="overCurrent" type="text" class="form-control" aria-label="过流保护">
							<span class="input-group-addon">
        						<input id="overCurrentEnable" type="checkbox" aria-label="过流保护">
      						</span>
						</div>
					</div>
                    <span class="help-block col-sm-5">单位：A，检测到通过的电流大于设定电流时将关闭设备</span>
				</div>
                <div class="row form-group">
					<label class="col-sm-1 control-label">过载保护：</label>
					<div class="col-sm-2">
						<div class="input-group">
							<input id="overPower" type="text" class="form-control" aria-label="过载保护">
							<span class="input-group-addon">
        						<input id="overPowerEnable" type="checkbox" aria-label="过载保护">
      						</span>
						</div>
					</div>
                    <span class="help-block col-sm-5">单位：W，检测到功率大于设定的功率时将关闭设备</span>
				</div>
                <div class="row form-group">
                    <label class="col-sm-1 control-label">充电保护：</label>
                    <div class="col-sm-2">
                        <div class="input-group">
                            <input id="underPower" type="text" class="form-control" aria-label="充电保护">
                            <span class="input-group-addon">
        						<input id="underPowerEnable" type="checkbox" aria-label="...">
      						</span>
                        </div>
                    </div>
                    <span class="help-block col-sm-5">单位：W，检测到功率小于设定的功率时在5分钟之后将关闭设备</span>
                </div>
				<div class="form-group">
					<label class="col-sm-1 control-label"></label>
					<div class="col-sm-2">
						<button id="meterButton" class="btn btn-primary btn-block" type="button">确定</button>
					</div>
				</div>

			</form>

			</div>
		</div>
	</div>

	<div class="modal fade" id="aboutModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<h4>关于</h4>
				</div>
				<div id="aboutBody" class="modal-body"></div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>

	<div class="modal fade" id="infoModal" tabindex="1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<h4>提示</h4>
				</div>
				<div id="infoBody" class="modal-body"></div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>

	<div class="modal fade" id="rebootModal" tabindex="1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<h4>提示</h4>
				</div>
				<div id="submitBody" class="modal-body">确认重启设备</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button id="rebootModalButton" type="submit" class="btn btn-primary">确定</button>
				</div>
			</div>
		</div>
	</div>

    <div class="modal fade" id="meterClearModal" tabindex="1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h4>提示</h4>
                </div>
                <div id="meterCleartBody" class="modal-body">确认将计量清零数据</div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button id="meterClearModalButton" type="submit" class="btn btn-primary">确定</button>
                </div>
            </div>
        </div>
    </div>

	<div class="modal fade" id="resetModal" tabindex="1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<h4>提示</h4>
				</div>
				<div class="modal-body">数据将全部清零，恢复到出厂模式</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button id="resetModalButton" type="submit" class="btn btn-primary">确定</button>
				</div>
			</div>
		</div>
	</div>

	<form id="timerSubmitForm" class="form-horizontal" role="form" action="timer" method="post">
		<div class="modal fade" id="timerSubmitModal" tabindex="2" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<h4 id="timerModalHead">定时</h4>
					</div>
					<div class="modal-body">
                        <div class="row form-group">
                            <label class="col-sm-3 control-label">名称：</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input id="timeName" type="text" class="form-control">
                                    <span class="input-group-addon">
        						        <input id="timeEnable" type="checkbox">
      						        </span>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <label class="col-sm-3 control-label">开启时间：</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input id="onTime" type="time" class="form-control">
                                    <span class="input-group-addon">
        						        <input id="onTimeEnable" type="checkbox">
      						        </span>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <label class="col-sm-3 control-label">关闭时间：</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input id="offTime" type="time" class="form-control form_time">
                                    <span class="input-group-addon">
        						        <input id="offTimeEnable" type="checkbox">
      						        </span>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <label class="col-sm-3 control-label">关联延时：</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input id="timerCascodeNum" type="number" class="form-control">
                                    <span class="input-group-addon">
        						        <input id="timerCascodeEnable" type="checkbox">
      						        </span>
                                </div>
                            </div>
                        </div>
    						<div class="form-group">
							<label class="col-sm-3 control-label">重&nbsp;&nbsp;复：</label>
							<div class="col-sm-7">
									<label class="checkbox-inline"><input id="week1" type="checkbox">周一</label>
								<label class="checkbox-inline"><input id="week2" type="checkbox">周二</label>
								<label class="checkbox-inline"><input id="week3" type="checkbox">周三</label>
								<label class="checkbox-inline"><input id="week4" type="checkbox">周四</label>
								<label class="checkbox-inline"><input id="week5" type="checkbox">周五</label>
							</div>
								<div class="col-sm-3"></div>
							<div class="col-sm-7">
								<label class="checkbox-inline"><input id="week6" type="checkbox">周六</label>
								<label class="checkbox-inline"><input id="week7" type="checkbox">周日</label>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
						<button id="timerSubmitBtn" type="submit" class="btn btn-primary">确定</button>
					</div>
				</div>
			</div>
		</div>
	</form>

	<form id="delaySubmitForm" class="form-horizontal" role="form" action="delay" method="post">
		<div class="modal fade" id="delaySubmitModal" tabindex="2" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<h4 id="delayModalHead">延时</h4>
					</div>
					<div class="modal-body">
                        <div class="row form-group">
                            <label class="col-sm-3 control-label">名称：</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input id="delayName" type="text" class="form-control">
                                    <span class="input-group-addon">
        						        <input id="delayEnable" type="checkbox">
      						        </span>
                                </div>
                            </div>
                        </div>

                        <div class="row form-group">
                            <label class="col-sm-3 control-label">开启间隔：</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input id="onInterval" type="time" class="form-control input-inline form_time">
                                    <span class="input-group-addon">
        						        <input id="onIntervalEnable" type="checkbox">
      						        </span>
                                </div>
                            </div>
                        </div>

                        <div class="row form-group">
                            <label class="col-sm-3 control-label">关闭间隔：</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input id="offInterval" type="time" class="form-control input-inline form_time">
                                    <span class="input-group-addon">
        						        <input id="offIntervalEnable" type="checkbox">
      						        </span>
                                </div>
                            </div>
                        </div>

                        <div class="row form-group">
                            <label class="col-sm-3 control-label">关联延时：</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input id="delayCascodeNum" type="number" class="form-control">
                                    <span class="input-group-addon">
        						        <input id="delayCascodeEnable" type="checkbox">
      						        </span>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <label class="col-sm-3 control-label">重复次数：</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input id="cycleTimes" type="number" class="form-control">
                                    <span class="input-group-addon">
      						        </span>
                                </div>
                            </div>
                        </div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
						<button id="delaySubmitBtn" type="submit" class="btn btn-primary">确定</button>
					</div>
				</div>
			</div>
		</div>
	</form>

	<form id="infraredSubmitForm" class="form-horizontal" role="form" action="infrared" method="post">
		<div class="modal fade" id="infraredSubmitModal" tabindex="2" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<h4 id="infraredModalHead">红外控制</h4>
					</div>
					<div class="modal-body">
                        <div class="row form-group">
                            <label class="col-sm-3 control-label">名称：</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input id="infraredName" type="text" class="form-control">
                                    <span class="input-group-addon">
        						        <input id="infraredEnable" type="checkbox">
      						        </span>
                                </div>
                            </div>
                        </div>

                        <div class="row form-group">
                            <label class="col-sm-3 control-label">开启值 :</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input id="infraredOnValue"  type="text" class="form-control input-inline">
                                    <span class="input-group-btn">
								        <button id="infraredOnBtn" class="form-control" type="button" onclick="infraredOnClick()">重新学习</button>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <label class="col-sm-3 control-label">关闭值 :</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input id="infraredOffValue"  type="text" class="form-control input-inline">
                                    <span class="input-group-btn">
								        <button id="infraredOffBtn" class="form-control" type="button" onclick="infraredOffClick()">重新学习</button>
                                    </span>
                                </div>
                            </div>
                        </div>
						</br><p class="text-center text-info">提示: 请将遥控器对准红外设备按下要学习的按键，并在30s内完成学习</p>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
						<button id="infraredSubmitBtn" type="submit" class="btn btn-primary">确定</button>
					</div>
				</div>
			</div>
		</div>
	</form>
    </div>

	<nav id="delayTaskClass" class="navbar navbar-default navbar-fixed-bottom">
		<div class="container">
			<div class="navbar-header">
				<p id="delayTask" class="navbar-text"></p>
			</div>
		</div>
	</nav>
</body>
</html>

